package com.java.variable_params;

/**
 * 可变参数
 */
public class VariableParams {
    public static void main(String[] args) {
        variableParams(1, 2, 3, 4, 5, 6, 7); // 1 2 3 4 5 6 7
    }
    
    public static void variableParams(int... params) {
        System.out.println(params); // [I@1b6d3586
        for (int param : params) {
            System.out.print(param + " ");
        }
    }
}
